package com.huilian.iotbox.client.service.impl;

import com.huilian.iotbox.client.dao.OrderItemDao;
import com.huilian.iotbox.client.service.OrderItemService;
import com.huilian.iotbox.data.po.OrderItem;
import com.huilian.iotbox.data.vo.OrderExchangeItemVo;
import com.huilian.iotbox.data.vo.OrderItemVo;
import com.huilian.iotbox.data.vo.OrderVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class OrderItemServiceImpl implements OrderItemService {
    @Resource
    private OrderItemDao orderItemDao;

    @Override
    public void add(OrderItem orderItem) {
        orderItemDao.add(orderItem);
    }

    @Override
    public void updateStatus(OrderItem orderItem) {
        orderItemDao.updateStatus(orderItem);
    }

    @Override
    public void update(OrderItem orderItem) {

        orderItemDao.update(orderItem);
    }

    @Override
    public List<OrderItem> getOrderItemById(Long orderId) {
        return orderItemDao.getOrderItemById(orderId);
    }

    @Override
    public List<OrderItemVo> getCommodityAndOrderItemByOrderId(Long orderId) {
        return orderItemDao.getCommodityAndOrderItemByOrderId(orderId);
    }

}
